<template>
  <div class="card-empty-warpper">
    <div class="card-empty-body"
      :style="{
        ...getBodyStyle()
      }"
    >
      <span>暂无数据</span>
    </div>
  </div>
</template>

<script setup>
const props = defineProps({
  backColor: { type: String, default: '#f8f8f8' }
})

const getBodyStyle = () => {
  const { backColor } = props
  let style = {}
  if (backColor) {
    style['background'] = backColor
  }
  return style
}

</script>

<style lang="scss" scoped>
.card-empty-warpper {
  flex: 1;
  padding: 0 5px;
  .card-empty-body {
    display: flex;
    // background: #f8f8f8;
    border-radius: 5px;
    height: 150px;
    text-align: center;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    // padding: 40px;
  }
}
</style>